package com.hj.springframework2.aop;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @Author : hujing
 * @Date: 2025/6/24 15:05
 * @Description:
 */
public abstract class AfterInvocationHandlerAdapter implements InvocationHandler {
    
    public abstract Object after(Object proxy,Object returnValue,Method method,Object[] args);
    
    @Override
    public final Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object result = method.invoke(proxy, args);
        return after(proxy,result,method,args);
    }
}
